<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="../css/common.css">
    <link rel="stylesheet" href="../css/login.css">
</head>
<body>
<!-- 导航栏 -->
<div class="nav">
    <img src="../img/logo.jpg" alt="">
    <span class="title">我的博客系统</span>
    <!-- 用来占据中间位置 -->
    <span class="spacer"></span>
    <a href="blog_list.html">主页</a>
    <a href="blog_edit.html">写博客</a>
    <a href="logout">注销</a>
</div>
<!-- 版心 -->
<div class="login-container">
    <!-- 中间的登陆框 -->
    <div class="login-dialog">
        <h3>登陆</h3>
        <div class="row">
            <span>用户名</span>
            <input type="text" id="username">
        </div>
        <div class="row">
            <span>密码</span>
            <input type="password" id="password">
        </div>
        <div class="row">
            <button id="submit">提交</button>
        </div>
    </div>
</div>

<script>
    document.getElementById('submit').onclick = function() {
        // 可选：简单校验
        var username = document.getElementById('username').value.trim();
        var password = document.getElementById('password').value.trim();
        if (!username || !password) {
            alert('请输入用户名和密码');
            return;
        }
        // 跳转到主页面
        window.location.href = 'blog_list.html';
    };
</script>

</body>
</html>